package com.app.action;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class HelloWorldAction {
	
    @RequestMapping(value = "/", method = RequestMethod.GET)  
    public String index(Model model) {  
    	System.out.println("execute");
        return "index";  
    }  
	
    @RequestMapping(value="/helloworld.do",method=RequestMethod.GET)
    public String helloWorld(Model model,@CookieValue("JSESSIONID") String cookie) {
    	System.out.println("execute---------cookie=" + cookie);
        model.addAttribute("message", "Hello World!");
        return "helloword";
    }
}
